import 'package:flutter/material.dart';

class RegisterPage extends StatefulWidget {
  @override
  _RegisterPageState createState() => _RegisterPageState();
}

class _RegisterPageState extends State<RegisterPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Color.fromRGBO(244, 245, 245, 1.0),
        appBar: AppBar(
          title: Text('注册'),
          elevation: 0.0,
        ),
        body: Center(
            child: ListView(
          padding: EdgeInsets.only(left: 40.0, right: 40.0),
          children: <Widget>[
            Container(
              padding: EdgeInsets.only(top: 34.0, bottom: 46.0),
              child: Text("校园共享单车",
                  textAlign: TextAlign.center,
                  style: new TextStyle(
                      fontSize: 30.0,
                      fontWeight: FontWeight.w900,
                      fontFamily: "Georgia",
                      color: Colors.pink)),
            ),
            TextField(
                keyboardType: TextInputType.emailAddress,
                autofocus: false,
                decoration: InputDecoration(
                    contentPadding: EdgeInsets.all(10.0),
                    hintText: '请输入账号',
                    labelText: "请输入账号")),
            TextField(
                keyboardType: TextInputType.emailAddress,
                autofocus: false,
                obscureText: true,
                decoration: InputDecoration(
                    contentPadding: EdgeInsets.all(10.0),
                    hintText: '请输入密码',
                    labelText: "请输入密码")),
            Container(
              margin: EdgeInsets.only(top: 29.0),
              child: RaisedButton(
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(18),
                ),
                onPressed: () {
                  // Navigator.of(context).pushNamedAndRemoveUntil(RootScene.tag, ModalRoute.withName(WelcomePage.tag));
                },
                padding: EdgeInsets.all(7),
                color: Color.fromRGBO(255, 170, 13, 1),
                child: Text('登录',
                    style: TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.bold,
                        fontSize: 20.0,
                        letterSpacing: 25.0)),
              ),
            ),
            FlatButton(
              child: Text(
                '注册账号',
                style: TextStyle(color: Color.fromRGBO(255, 170, 13, 1)),
              ),
              onPressed: () {
                Navigator.pushNamed(context, "/register");
                // Application.router.navigateTo.(context,"/register",transition: TransitionType.inFromRight);
              },
            )
          ],
        )));
  }
}
